﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DXL_Library
{
    /// <summary>
    /// This class wrapps all the usefull settings that the DXLLibrary supports
    /// </summary>
    public class DXL_LibraryParameters
    {
        #region Fields
        public string pathToXLfile;

        public string pathToSpecsFile;

        public bool allowEmptyCells;

        public bool allowDataTypeEquivalence;

        public bool DONT_USE_BUGGY_LoadRowByRow;

        public bool DEBUG;

        #endregion

        #region public methods 

        public DXL_LibraryParameters(bool allowEmptyCells, bool allowDataTypeEquivalence)
        {
            CommonConstructor(this, string.Empty, allowEmptyCells, allowDataTypeEquivalence, string.Empty);
        }
        public DXL_LibraryParameters(string XLfilePath, bool allowEmptyCells, bool allowDataTypeEquivalence, string specsFilePath)
        {
            CommonConstructor(this, XLfilePath, allowEmptyCells, allowDataTypeEquivalence, specsFilePath);
        }

        public DXL_LibraryParameters(string XLfilePath, string specsFilePath)
        {
            CommonConstructor(this, XLfilePath, true, true, specsFilePath);
        }

        private void CommonConstructor(DXL_LibraryParameters p, string XLfilePath, bool allowEmptyCells, bool allowDataTypeEquivalence, string specsFilePath)
        {
            p.pathToXLfile = XLfilePath ;
            p.pathToSpecsFile = specsFilePath ;
            p.allowEmptyCells = allowEmptyCells;
            p.allowDataTypeEquivalence = allowDataTypeEquivalence;
        }

        #endregion
    }
}
